<?php

namespace App\Providers;

use App\Entities\History;
use App\Entities\Talent;
use App\Entities\TalentRelationship;
use App\Repositories\Eloquent\EloquentHistoryRepository;
use App\Repositories\Eloquent\EloquentTalentRelationshipRepository;
use App\Repositories\Eloquent\EloquentTalentRepository;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
        $this->registerBindings();
    }

    private function registerBindings()
    {
        $this->app->bind(
            'App\Repositories\TalentRepository',
            function() {
                return new EloquentTalentRepository(new Talent());
            }
        );

        $this->app->bind(
            'App\Repositories\TalentRelationshipRepository',
            function() {
                return new EloquentTalentRelationshipRepository(new TalentRelationship());
            }
        );

        $this->app->bind(
            'App\Repositories\HistoryRepository',
            function() {
                return new EloquentHistoryRepository(new History());
            }
        );


    }
}
